package net.onecloud.onecloud.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by zaizai on 16/7/27.
 */
public class ResultToemploy implements Parcelable {


    private int code;
    private int success;
    private int more;
    private String message;
    private List<DataEntity> data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public int getSuccess() {
        return success;
    }

    public void setSuccess(int success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getMore() {
        return more;
    }

    public void setMore(int more) {
        this.more = more;
    }

    public List<DataEntity> getData() {
        return data;
    }

    public void setData(List<DataEntity> data) {
        this.data = data;
    }

    public static class DataEntity implements Parcelable {


        private String id;
        private String tdate;//投递时间
        private int tstate = -1;//状态
        private String rname; //名称
        private String school;//毕业学校
        private String rposition;//求职职位
        private String contact;//联系方式
        private String exprience;//项目/实习经历
        private String skill;//技能
        private String sex;//性别
        private String post_id;//外键
        private String user_id;//外键

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getTdate() {
            return tdate;
        }

        public void setTdate(String tdate) {
            this.tdate = tdate;
        }

        public int getTstate() {
            return tstate;
        }

        public void setTstate(int tstate) {
            this.tstate = tstate;
        }

        public String getRname() {
            return rname;
        }

        public void setRname(String rname) {
            this.rname = rname;
        }

        public String getSchool() {
            return school;
        }

        public void setSchool(String school) {
            this.school = school;
        }

        public String getRposition() {
            return rposition;
        }

        public void setRposition(String rposition) {
            this.rposition = rposition;
        }

        public String getContact() {
            return contact;
        }

        public void setContact(String contact) {
            this.contact = contact;
        }

        public String getExprience() {
            return exprience;
        }

        public void setExprience(String exprience) {
            this.exprience = exprience;
        }

        public String getSkill() {
            return skill;
        }

        public void setSkill(String skill) {
            this.skill = skill;
        }

        public String getSex() {
            return sex;
        }

        public void setSex(String sex) {
            this.sex = sex;
        }

        public String getPost_id() {
            return post_id;
        }

        public void setPost_id(String post_id) {
            this.post_id = post_id;
        }

        public String getUser_id() {
            return user_id;
        }

        public void setUser_id(String user_id) {
            this.user_id = user_id;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.tdate);
            dest.writeInt(this.tstate);
            dest.writeString(this.rname);
            dest.writeString(this.school);
            dest.writeString(this.rposition);
            dest.writeString(this.contact);
            dest.writeString(this.exprience);
            dest.writeString(this.skill);
            dest.writeString(this.sex);
            dest.writeString(this.post_id);
            dest.writeString(this.user_id);
        }

        public DataEntity() {
        }

        protected DataEntity(Parcel in) {
            this.id = in.readString();
            this.tdate = in.readString();
            this.tstate = in.readInt();
            this.rname = in.readString();
            this.school = in.readString();
            this.rposition = in.readString();
            this.contact = in.readString();
            this.exprience = in.readString();
            this.skill = in.readString();
            this.sex = in.readString();
            this.post_id = in.readString();
            this.user_id = in.readString();
        }

        public static final Creator<DataEntity> CREATOR = new Creator<DataEntity>() {
            @Override
            public DataEntity createFromParcel(Parcel source) {
                return new DataEntity(source);
            }

            @Override
            public DataEntity[] newArray(int size) {
                return new DataEntity[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.code);
        dest.writeInt(this.success);
        dest.writeString(this.message);
        dest.writeList(this.data);
        dest.writeInt(this.more);
    }

    public ResultToemploy() {
    }

    protected ResultToemploy(Parcel in) {
        this.code = in.readInt();
        this.success = in.readInt();
        this.more = in.readInt();
        this.message = in.readString();
        this.data = new ArrayList<DataEntity>();
        in.readList(this.data, DataEntity.class.getClassLoader());
    }

    public static final Creator<ResultToemploy> CREATOR = new Creator<ResultToemploy>() {
        @Override
        public ResultToemploy createFromParcel(Parcel source) {
            return new ResultToemploy(source);
        }

        @Override
        public ResultToemploy[] newArray(int size) {
            return new ResultToemploy[size];
        }
    };
}
